Optimal. Leaf size=135 \[ \frac {(a+b x) \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2}{b}+\frac {2 B (b c-a d) n \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right ) \log \left (\frac {b c-a d}{b (c+d x)}\right )}{b d}+\frac {2 B^2 (b c-a d) n^2 \text {Li}_2\left (\frac {d (a+b x)}{b (c+d x)}\right )}{b d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.17, antiderivative size = 135, normalized size of antiderivative = 1.00, number of steps
used = 6, number of rules used = 6, integrand size = 24, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.250, Rules used = {2535, 2543,
2458, 2378, 2370, 2352} \begin {gather*} \frac {2 B^2 n^2 (b c-a d) \text {PolyLog}\left (2,\frac {d (a+b x)}{b (c+d x)}\right )}{b d}+\frac {2 B n (b c-a d) \log \left (\frac {b c-a d}{b (c+d x)}\right ) \left (B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A\right )}{b d}+\frac {(a+b x) \left (B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A\right )^2}{b} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2352
Rule 2370
Rule 2378
Rule 2458
Rule 2535
Rule 2543
Rubi steps
\begin {align*} \int \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2 \, dx &=x \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2-(2 B n) \int \frac {(b c-a d) x \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{(a+b x) (c+d x)} \, dx\\ &=x \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2-(2 B (b c-a d) n) \int \frac {x \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{(a+b x) (c+d x)} \, dx\\ &=x \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2-(2 B (b c-a d) n) \int \left (-\frac {a \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{(b c-a d) (a+b x)}+\frac {c \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{(b c-a d) (c+d x)}\right ) \, dx\\ &=x \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2+(2 a B n) \int \frac {A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )}{a+b x} \, dx-(2 B c n) \int \frac {A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )}{c+d x} \, dx\\ &=\frac {2 a B n \log (a+b x) \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{b}+x \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2-\frac {2 B c n \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right ) \log (c+d x)}{d}-\frac {\left (2 a B^2 n^2\right ) \int \frac {(c+d x) \left (-\frac {d (a+b x)}{(c+d x)^2}+\frac {b}{c+d x}\right ) \log (a+b x)}{a+b x} \, dx}{b}+\frac {\left (2 B^2 c n^2\right ) \int \frac {(c+d x) \left (-\frac {d (a+b x)}{(c+d x)^2}+\frac {b}{c+d x}\right ) \log (c+d x)}{a+b x} \, dx}{d}\\ &=\frac {2 a B n \log (a+b x) \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{b}+x \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2-\frac {2 B c n \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right ) \log (c+d x)}{d}-\frac {\left (2 a B^2 n^2\right ) \int \left (\frac {b \log (a+b x)}{a+b x}-\frac {d \log (a+b x)}{c+d x}\right ) \, dx}{b}+\frac {\left (2 B^2 c n^2\right ) \int \left (\frac {b \log (c+d x)}{a+b x}-\frac {d \log (c+d x)}{c+d x}\right ) \, dx}{d}\\ &=\frac {2 a B n \log (a+b x) \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{b}+x \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2-\frac {2 B c n \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right ) \log (c+d x)}{d}-\left (2 a B^2 n^2\right ) \int \frac {\log (a+b x)}{a+b x} \, dx-\left (2 B^2 c n^2\right ) \int \frac {\log (c+d x)}{c+d x} \, dx+\frac {\left (2 b B^2 c n^2\right ) \int \frac {\log (c+d x)}{a+b x} \, dx}{d}+\frac {\left (2 a B^2 d n^2\right ) \int \frac {\log (a+b x)}{c+d x} \, dx}{b}\\ &=\frac {2 a B n \log (a+b x) \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{b}+x \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2+\frac {2 B^2 c n^2 \log \left (-\frac {d (a+b x)}{b c-a d}\right ) \log (c+d x)}{d}-\frac {2 B c n \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right ) \log (c+d x)}{d}+\frac {2 a B^2 n^2 \log (a+b x) \log \left (\frac {b (c+d x)}{b c-a d}\right )}{b}-\left (2 a B^2 n^2\right ) \int \frac {\log \left (\frac {b (c+d x)}{b c-a d}\right )}{a+b x} \, dx-\frac {\left (2 a B^2 n^2\right ) \text {Subst}\left (\int \frac {\log (x)}{x} \, dx,x,a+b x\right )}{b}-\left (2 B^2 c n^2\right ) \int \frac {\log \left (\frac {d (a+b x)}{-b c+a d}\right )}{c+d x} \, dx-\frac {\left (2 B^2 c n^2\right ) \text {Subst}\left (\int \frac {\log (x)}{x} \, dx,x,c+d x\right )}{d}\\ &=-\frac {a B^2 n^2 \log ^2(a+b x)}{b}+\frac {2 a B n \log (a+b x) \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{b}+x \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2+\frac {2 B^2 c n^2 \log \left (-\frac {d (a+b x)}{b c-a d}\right ) \log (c+d x)}{d}-\frac {2 B c n \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right ) \log (c+d x)}{d}-\frac {B^2 c n^2 \log ^2(c+d x)}{d}+\frac {2 a B^2 n^2 \log (a+b x) \log \left (\frac {b (c+d x)}{b c-a d}\right )}{b}-\frac {\left (2 a B^2 n^2\right ) \text {Subst}\left (\int \frac {\log \left (1+\frac {d x}{b c-a d}\right )}{x} \, dx,x,a+b x\right )}{b}-\frac {\left (2 B^2 c n^2\right ) \text {Subst}\left (\int \frac {\log \left (1+\frac {b x}{-b c+a d}\right )}{x} \, dx,x,c+d x\right )}{d}\\ &=-\frac {a B^2 n^2 \log ^2(a+b x)}{b}+\frac {2 a B n \log (a+b x) \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{b}+x \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2+\frac {2 B^2 c n^2 \log \left (-\frac {d (a+b x)}{b c-a d}\right ) \log (c+d x)}{d}-\frac {2 B c n \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right ) \log (c+d x)}{d}-\frac {B^2 c n^2 \log ^2(c+d x)}{d}+\frac {2 a B^2 n^2 \log (a+b x) \log \left (\frac {b (c+d x)}{b c-a d}\right )}{b}+\frac {2 a B^2 n^2 \text {Li}_2\left (-\frac {d (a+b x)}{b c-a d}\right )}{b}+\frac {2 B^2 c n^2 \text {Li}_2\left (\frac {b (c+d x)}{b c-a d}\right )}{d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.12, size = 226, normalized size = 1.67 \begin {gather*} x \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2+\frac {B n \left (2 a d \log (a+b x) \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )-2 b c \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right ) \log (c+d x)-a B d n \left (\log (a+b x) \left (\log (a+b x)-2 \log \left (\frac {b (c+d x)}{b c-a d}\right )\right )-2 \text {Li}_2\left (\frac {d (a+b x)}{-b c+a d}\right )\right )+b B c n \left (\left (2 \log \left (\frac {d (a+b x)}{-b c+a d}\right )-\log (c+d x)\right ) \log (c+d x)+2 \text {Li}_2\left (\frac {b (c+d x)}{b c-a d}\right )\right )\right )}{b d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [F]
time = 0.06, size = 0, normalized size = 0.00 \[\int \left (A +B \ln \left (e \left (\frac {b x +a}{d x +c}\right )^{n}\right )\right )^{2}\, dx\]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \left (A + B \log {\left (e \left (\frac {a + b x}{c + d x}\right )^{n} \right )}\right )^{2}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int {\left (A+B\,\ln \left (e\,{\left (\frac {a+b\,x}{c+d\,x}\right )}^n\right )\right )}^2 \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________